Skip to content

fix(release): list tags via git ls-remote to remove the 1000-tag cliff#509

Merged
CSRessel merged 1 commit into
mainfrom
fix-release-tag-1000-cap
Jun 9, 2026
Merged

fix(release): list tags via git ls-remote to remove the 1000-tag cliff#509
CSRessel merged 1 commit into
mainfrom
fix-release-tag-1000-cap

Conversation

@CSRessel

@CSRessel CSRessel commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

🤖 Generated with Nori

Found while auditing the sibling release scripts after the same class of bug was fixed in nori-skillsets (tilework-tech/nori-skillsets#522).

list_tags() called gh api --paginate /repos/{repo}/git/refs/tags. That endpoint emits no Link header, so --paginate is a no-op and the response is silently capped at 1000 refs. There's no hang (unlike the skillsets bug, which hand-rolled the pagination loop), but past 1000 tags it would return a truncated set and compute the wrong "latest" version. At 210 tags today there's headroom, but as the most frequently released product it'll get there first.

  • Switch list_tags() to git ls-remote --tags origin: one git-protocol round trip, no pagination, no ref-count cap, zero REST rate-limit exposure.
  • Filter the peeled ^{} refs that annotated tags emit so versions aren't double-counted.
  • Add unit tests — this script had no test coverage previously.

Test Plan

  • python3 -m unittest scripts.test_create_nori_release — 2 tests pass (remote-tag parsing + peeled-ref dedup; raises on failed query)
  • ./scripts/create_nori_release --get-latest-stable0.23.0
  • ./scripts/create_nori_release --publish-release --dry-run0.24.0
  • ./scripts/create_nori_release --get-next-version0.23.0-next.4
  • ruff check clean (also fixed 2 pre-existing f-string lint nits)

Share Nori with your team: https://www.npmjs.com/package/nori-skillsets

list_tags() called 'gh api --paginate /git/refs/tags', but that endpoint
emits no Link header, so --paginate is a no-op and the response is
silently capped at 1000 refs. Past 1000 tags it would return a truncated
set and compute the wrong 'latest' version.

Read tags via 'git ls-remote --tags' instead: one git-protocol round
trip, no pagination, no ref-count cap, and zero REST rate-limit exposure.
Peeled '^{}' refs from annotated tags are filtered to avoid duplicates.
Adds unit tests (no test coverage existed for this script before).
@CSRessel CSRessel merged commit 72185e1 into main Jun 9, 2026
2 checks passed
@CSRessel CSRessel deleted the fix-release-tag-1000-cap branch June 9, 2026 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant